package com.xcc.annotation.ext.core;

import com.xcc.annotation.ioc.bean.Cat;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
public class Demo03_Listener {

    /**
     * 普通方法加注解就可以监听任意指定的Class
     */
    @EventListener(classes = {Cat.class})
    public void listener(Cat cat){
        System.out.println(cat);
    }
}
